using System;
using System.Collections;
using System.Collections.Generic;
using Microsoft.DirectX;

namespace RPGOnline.Extensions
{
    public static class ExtensionMethods
    {
        public static void ForEach<T>(this IEnumerable<T> enumerable, Action<T> action)
        {
            foreach (T item in enumerable)
            {
                action(item);
            }
        }

        public static void ForEach<T>(this IEnumerable enumerable, Action<T> action)
        {
            foreach(T item in enumerable)
            {
                action(item);
            }
        }
    }

	public static class TextureMatrix
	{
		public static Matrix Translate2D(float x, float y)
		{
			var matrix = Matrix.Identity;
			matrix.M31 = x;
			matrix.M32 = y;
			return matrix;
		}
	}
}